/*******************************************************************************
 * Copyright (c) 2014 Steffen Mikkelsen
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Steffen Mikkelsen - initial API and implementation
 ******************************************************************************/
package com.subsecret.secureconnection.securestream.stream;

import java.io.IOException;
import java.io.InputStream;

public abstract class AbstractInputStreamWrapper extends InputStream {
    protected InputStream is;
    
    public AbstractInputStreamWrapper(InputStream is) {
        this.is = is;
    }
    
    @Override
    public synchronized void reset() throws IOException {
        is.reset();
    }
    
    @Override
    public int available() throws IOException {
        return is.available();
    }
    
    @Override
    public boolean markSupported() {
        return is.markSupported();
    }
    
    @Override
    public synchronized void mark(int readlimit) {
        is.mark(readlimit);
    }
    
    @Override
    public void close() throws IOException {
        is.close();
    }
    
    @Override
    public abstract int read(byte b[]) throws IOException;
    
    @Override
    public abstract int read(byte b[], int off, int len) throws IOException;
}
